package com.wdy.visitor;

/**
 * @ClassName: App
 * @Description: TODO
 * @Date: 2019/12/30 14:25
 * @Author: wangdy001
 * @Version: 1.0
 */
public class App {
    public static void main(String[] args) {
        DocVisitor docVisitor = new DocVisitor();
        UnixVisitor unixVisitor = new UnixVisitor();
        Modem zoom = new Zoom();
        Modem hayes = new Hayes();


        zoom.accept(docVisitor); //yes
        zoom.accept(unixVisitor);//yes
        hayes.accept(docVisitor);//yes
        hayes.accept(unixVisitor);//not
    }
}
